package top.aicats.pattern.factory.SimpleFactory;

import top.aicats.pattern.factory.ICourse;


public class SimpleFactory {
    public ICourse create(Class<? extends ICourse> clazz) {
        try {
            if (null != clazz) {
                return clazz.newInstance();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return null;
    }
}
